package example.gl2jniforceball;

public class JniInterface {

    static {
        System.loadLibrary("box2D");
    }

    public native static void createWorld(float minX, float minY, float maxX,
            float maxY, float gravityX, float gravityY);

    public native static int createBox(float x, float y, float width, float height);

    public native static int createBoxPlayer(float x, float y, float width, float height,
            float density, float restitution, float friction);

    public native static int createCircle(float x, float y, float radius,
            float weight, float restitution, float friction);

    public native static int createCirclePlayer(float x, float y, float radius,
            float weight, float restitution, float friction);

    public native static BodyInfo getBodyInfo(BodyInfo info, int index);

    public native static void step(float stepTime, int velocityIterations,
            int positionIterations);

    public native static void setGravity(float gravityX, float gravityY);

    public native static void destroyBody(int id);

    public native static void getCollisions(CollisionIdKeeper keeper, int index);
    
    public native static void setTransform(int id, float x, float y, float radiant);
    public native static void setTranslate(int id, float x, float y);
    public native static void setRotate(int id, float radiant);

    public native static void setBodyAngularVelocity(int id, float radiant);

    public native static void setBodyLinearVelocity(int id, float x, float y);

    public native static BodyInfo getStatus(BodyInfo info, int index);

    public native static BodyInfo getLinerVelocity(BodyInfo info, int index);
    
    public native static boolean mouseDown(float x, float y);
    public native static void mouseUp(float x, float y);
    public native static void mouseMove(float x, float y);

}
